package com.yurun.service.impl;

import com.yurun.entity.Course;
import com.yurun.mapper.CourseMapper;
import com.yurun.service.CourseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.sql.SQLException;
import java.util.List;

/**
 * @author 宫静雨
 */
@Service
@Transactional(rollbackFor = SQLException.class)
public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> implements CourseService {

    @Resource
    private CourseMapper courseMapper;

    @Override
    public List<Course> listCourse(List<Integer> courseId, String courseName) {
        return courseMapper.listCourse(courseId, courseName);
    }
}
